app chooser: Move buttons to template
authorMatthias Clasen <mclasen@redhat.com>
Wed, 9 Jul 2014 23:46:16 +0000 (19:46 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 9 Jul 2014 23:48:27 +0000 (19:48 -0400)
Use the new builder dialog action support.

gtk/gtkappchooserdialog.c
gtk/resources/ui/gtkappchooserdialog.ui
gtk/resources/ui/gtkappchooserdialog.ui.h

index 8074312e6f1518132804b53c878a89466e223d7c..485149f249c3887f663cc50d2da0feb6519b5216 100644 (file)
@@ -702,11 +702,6 @@ gtk_app_chooser_dialog_init (GtkAppChooserDialog *self)
 
   gtk_widget_init_template (GTK_WIDGET (self));
   gtk_dialog_set_use_header_bar_from_setting (GTK_DIALOG (self));
-  gtk_dialog_add_buttons (GTK_DIALOG (self),
-                          _("_Cancel"), GTK_RESPONSE_CANCEL,
-                          _("_Select"), GTK_RESPONSE_OK,
-                          NULL);
-  gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_OK);
 
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_dialog_set_alternative_button_order (GTK_DIALOG (self),
index b386328f3e9ed388b95bcdd50f473c3526c2bb29..6cf4c36c2576ff63561417f93ed9cc3fdde687fc 100644 (file)
         </child>
       </object>
     </child>
+    <child type="action">
+      <object class="GtkButton" id="cancel_button">
+        <property name="visible">True</property>
+        <property name="use_underline">True</property>
+        <property name="label" translatable="yes">_Cancel</property>
+      </object>
+    </child>
+    <child type="action">
+      <object class="GtkButton" id="ok_button">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">_Select</property>
+        <property name="use_underline">True</property>
+        <property name="can_default">True</property>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="cancel">cancel_button</action-widget>
+      <action-widget response="ok" default="true">ok_button</action-widget>
+    </action-widgets>
   </template>
   <object class="GtkButton" id="show_more_button">
     <property name="label" translatable="yes">_View All Applications</property>
index 7e67c541cdff158bf0c960fe578f7f4e4b882c09..2a0f7b9d9867c1a076bd7ef968f34f53df701e9c 100644 (file)
@@ -1,4 +1,6 @@
 N_("Select Application");
 N_("label");
+N_("_Cancel");
+N_("_Select");
 N_("_View All Applications");
 N_("_Find New Applications");